package com.uphone.magicleafteacher.pro.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.uphone.magicleafteacher.R;
import com.uphone.magicleafteacher.util.CommonUtil;
import com.uphone.magicleafteacher.view.MyBaseViewHolder;
import com.uphone.magicleafteacher.vo.RehearsalBean;

public class RehearsalAdapter extends BaseQuickAdapter<RehearsalBean.RepeatDetailBean.FinishedStudentsBean, MyBaseViewHolder> {


    public RehearsalAdapter() {
        super(R.layout.layout_item_retell);
    }

    @Override
    protected void convert(MyBaseViewHolder helper, RehearsalBean.RepeatDetailBean.FinishedStudentsBean item) {
        helper.setText(R.id.tv_item, "学员   " + CommonUtil.getStr(item.getStudentName()) + "   已复述完成")
                .setText(R.id.tv_time, CommonUtil.getStr(item.getAnswerTime()));
//        1:没有批改, 2:已经批改
        if (item.getIsRemark() == 1) {
            helper.setImageView(mContext, R.id.iv_statue,
                    mContext.getResources().getDrawable(R.mipmap.teacher_wei));
        } else {
            helper.setImageView(mContext, R.id.iv_statue,
                    mContext.getResources().getDrawable(R.mipmap.teacher_yi));
        }
    }
}
